﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MINERP.DAL.CommonDAL
{
    public class PrinterDAL : DALBase
    {
        /// <summary>
        /// 得到打印机列表
        /// </summary>
        /// <param name="pinBanUsed">拼板是否占用</param>
        /// <param name="PrintUsed">打印管理是否占用</param>
        /// <returns></returns>
        public static List<printer> GetAllPrinter(int? pinBanUsed, int? PrintUsed)
        {
            if (pinBanUsed == null && PrintUsed == null)
            {
                return null;
            }
            else
            {
                if (pinBanUsed == null)
                {
                    return DataEntites.printer.Where(p => p.status2 == PrintUsed).ToList();
                }
                else
                {
                    return DataEntites.printer.Where(p => p.status == pinBanUsed).ToList();
                }
            }
        }
    }
}
